package com.java.basis.collection;

/**
 * @author wangning
 * @create 2021-04-05 21:57
 */
public class Student {

	private String name;

	private Integer age;

	public Student() {}

	public Student(String name, Integer age) {
		this.name = name;
		this.age = age;
	}

	public String getName() {
		return name;
	}

	public Integer getAge() {
		return age;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

//	@Override
//	public boolean equals(Object o) {
//		//1.判断是不是同一个对象
//		if (this == o) return true;
//		//2.判断是否为空
//		if (o == null) {
//			return false;
//		}
//		//3.判断是不是Student
//		if (!(o instanceof Student)) return false;
//		Student student = (Student) o;
//		return Objects.equals(name, student.name) &&
//				Objects.equals(age, student.age);
//	}

	@Override
	public String toString() {
		return "Student{" +
				"name='" + name + '\'' +
				", age=" + age +
				'}';
	}
}
